package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.ZxYusuan;
import cn.stylefeng.guns.sys.modular.system.model.params.ZxYusuanParam;
import cn.stylefeng.guns.sys.modular.system.model.result.ZxYusuanResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 装修预算表 服务类
 * </p>
 *
 * @author jiangge
 * @since 2020-11-02
 */
public interface ZxYusuanService extends IService<ZxYusuan> {

    /**
     * 新增
     *
     * @author jiangge
     * @Date 2020-11-02
     */
    void add(ZxYusuanParam param);

    /**
     * 删除
     *
     * @author jiangge
     * @Date 2020-11-02
     */
    void delete(ZxYusuanParam param);

    /**
     * 更新
     *
     * @author jiangge
     * @Date 2020-11-02
     */
    void update(ZxYusuanParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author jiangge
     * @Date 2020-11-02
     */
    ZxYusuanResult findBySpec(ZxYusuanParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author jiangge
     * @Date 2020-11-02
     */
    List<ZxYusuanResult> findListBySpec(ZxYusuanParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author jiangge
     * @Date 2020-11-02
     */
    LayuiPageInfo findPageBySpec(ZxYusuanParam param);

    List<Map<String, Object>> listExport(Long btyZxMdzxId);

    Integer getMaxXuhaoByMdId(Long btyZxMdzxId);

    ResponseData batchImport(String fileName, MultipartFile file) throws Exception;

    @Transactional(rollbackFor = Exception.class)
    ResponseData yusuanSheet(Sheet sheet, Long zxmdid);

    ResponseData copyYusn(ZxYusuanParam param);

    ResponseData initYusuanData(ZxYusuanParam zxYusuanParam);
}
